
<?php if(sfConfig::get('app_reports_show_vue_all_reports',false)):?>
	<div style="text-align:right;">
		<?php echo link_to(__('See all reports'), 'reports/listAllReports');?>
	</div>
<?php endif;?>
<?php $sectionPrev = current(array_keys($reportsList)); // get the first section name?>
<fieldset id="reportSection_' <?php echo $sectionPrev ?>'" class="reportSection"><legend class="reportSectionLegend"><?php echo $sectionPrev ?></legend>
<?php foreach ($reportsList as $section => $reportsParSection):?>
	<?php echo ($section != $sectionPrev) ?  '</fieldset><fieldset id="reportSection_' . $section . '" class="reportSection"><legend class="reportSectionLegend">' . $section . '</legend>' : '';?>
	<ul>
	<?php foreach ($reportsParSection as $monReport):?>
		<li>
			<?php
				if($monReport['module'] == "" && $monReport['action'] == "")
				{
					echo link_to($monReport['title'], 'reports/reportViewer?id='.$monReport['id'], array('method'=>'put'));
				}
				else
				{
					echo link_to($monReport['title'], $monReport['module'] . "/" . $monReport['action'].'?id='.$monReport['id'], array('method'=>'put'));
				}
			?>
			<br />
			<span class="formHint"><?php echo $monReport['description']?></span>
		</li>
	<?php endforeach;?>
	</ul>
	<?php $sectionPrev = $section;?>
<?php endforeach;?>
</fieldset>
